<?php

namespace Database\Factories;

use App\Models\Qrcode;
use Illuminate\Database\Eloquent\Factories\Factory;

class QrcodeFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Qrcode::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'user_id' => $this->faker->numberBetween(1, 200),
            'third_type' => $this->faker->text(10),
            'ticket' => $this->faker->text(15),
            'expire_time' => $this->faker->time('Y-m-d H:i:s', 'now'),
            'qrcode_url' => $this->faker->text(25),
            'type' => $this->faker->randomElement(
                [
                    'app',
                    'applet',
                    'h5',
                ]
            ),
            'status' => $this->faker->randomElement([0, 1]),
            'url' => $this->faker->text(20),
            'scan' => $this->faker->numberBetween(1, 500),
        ];
    }
}
